﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace Asion.VSIX.Code.Create.Core.FrameWork
{ 
    /// <summary>
    /// 文件处理类
    /// </summary>
    public static class FileUtils
    {
        public static string ReadFileByRelativeFilePath(string relativeFilePath)
        {
            string basePath = AppDomain.CurrentDomain.BaseDirectory;
            string path = Path.Combine(basePath, relativeFilePath);
            if(!File.Exists(path))
            {
                throw new FileNotFoundException(relativeFilePath);
            }
            string templateTxt = File.ReadAllText(path);

            return templateTxt;
        }
    }
}
